import React, { PureComponent } from 'react'
import { Input } from 'antd'
import styles from './style.module.less'

const { TextArea } = Input
export default class CustomTextarea extends PureComponent {
  render() {
    return (
      <div className={styles.container}>
        <TextArea {...this.props} />
        <span className={styles.counter}>
          {this.props.value ? this.props.value.length : 0}/{this.props.maxLength}
        </span>
      </div>
    )
  }
}
